<template>
  <!-- 儿童福利证-->
  <div>
    <Form label-position="right" :label-width="400" :model="form">
            <Row class="mb20">
              <Col span="12" class="ivu-form-item-label" style="font-size: 14px;font-weight: bold">申请人基本情况</Col>
            </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">姓名：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.name"></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">年龄：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.age" ></Input>
        </Col>
      </Row>
<!--      <Row class="mb20">-->
<!--        <Col span="5" class="ivu-form-item-label">性别：</Col>-->
<!--        <Col span="6" class="ivu-form-item-content">-->
<!--          <RadioGroup v-model="form.sex">-->
<!--            <Radio label="男"></Radio>-->
<!--            <Radio label="女"></Radio>-->
<!--          </RadioGroup>-->
<!--        </Col>-->
<!--      </Row>-->
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">户籍：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.census" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">民族：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.nation" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">出生日期：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.dateofbirth" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">户籍所在地：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.placeofdomicile" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">现家庭住址：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.family" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">身份证号码 ：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.idcard" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" offset="1" class="ivu-form-item-label">是否受艾滋病影响：</Col>
        <Col span="6" class="ivu-form-item-content">
          <RadioGroup v-model="form.Aids">
            <Radio label="是"></Radio>
            <Radio label="否"></Radio>
          </RadioGroup>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" offset="1" class="ivu-form-item-label">类型：</Col>
        <Col span="6" class="ivu-form-item-content">
          <RadioGroup v-model="form.genre">
            <Radio label="父母双亡"></Radio>
            <Radio label="父母均被宣告死亡"></Radio>
            <Radio label="父母均被宣告失踪"></Radio>
            <Radio label="父母一方死亡，另一方宣告失踪"></Radio>
            <Radio label="父母一方宣告死亡，另一方宣告失踪"></Radio>
            <Radio label="父母一方（宣告）死亡（失踪），另一方患有精神病"></Radio>
            <Radio label="父母双方患有精神病"></Radio>
            <Radio label="父母一方（宣告）死亡（失踪），另一方服刑"></Radio>
            <Radio label="父母双方服刑"></Radio>
            <Radio label="其他"></Radio>
          </RadioGroup>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="12" class="ivu-form-item-label" style="font-size: 14px;font-weight: bold">监护人基本情况</Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">姓名：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardianname"></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">年龄：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardianage" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">户籍：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardiancensus" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">身份证号码：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardianidcard" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">户籍所在地：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardianplaceofdomicile" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">现家庭住址：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.guardianfamily" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">与孤儿关系：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.orphan" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">工作单位：</Col>
        <Col span="6" class="ivu-form-item-content">
<!--          <Input v-model="form.feedback" type="textarea"></Input>-->
          <Input v-model="form.organization" ></Input>
        </Col>
      </Row>
      <!--      <Row class="mb20">-->
      <!--        <Col span="13" class="ivu-form-item-label">-->
      <!--          <Button @click="save()">提交</Button>-->
      <!--        </Col>-->
      <!--      </Row>-->
      <Row class="mb20">
        <Col span="12" class="ivu-form-item-label" style="font-size: 14px;font-weight: bold">监护人单位基本情况</Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">单位地址：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.workaddress" ></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">单位名称：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.organizationname" ></Input>
        </Col>
      </Row>
<!--      <Row class="mb20">-->
<!--        -->
<!--      </Row>-->
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">单位负责人姓名：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.headofunit"></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">联系电话：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.unitphone" ></Input>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">单位联系人姓名：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.unitname"></Input>
        </Col>
        <Col span="4" class="ivu-form-item-label">联系电话：</Col>
        <Col span="6" class="ivu-form-item-content">
          <Input v-model="form.worktelephone" ></Input>
        </Col>
      </Row>
    </Form>
  </div>
</template>

<script>
// import { uploadPic } from '@/api/common'
export default {
  name: 'temporaryAssistance',
  data () {
    return {
      form: {
        name: '', // 名字
        age: '', // 年龄
        census: '', // 户籍
        nation: '', // 民族
        dateofbirth: '', // 出生日期
        placeofdomicile: '', // 户籍所在地
        family: '', // 现家庭住址
        idcard: '', // 身份证号码
        Aids: '', // 是否有艾滋
        genre: '', // 类型
        guardianname: '', // 监护人名字
        guardianage: '', // 监护人年龄
        guardiancensus: '', // 监护人户籍
        guardianidcard: '', // 监护人身份证号
        guardianplaceofdomicile: '', // 监护人户籍所在地
        guardianfamily: '', // 监护人家庭住址
        orphan: '', // 与孤儿关系
        organization: '', // 工作单位
        workaddress: '', // 单位地址
        organizationname: '', // 单位名称
        headofunit: '', // 单位负责人姓名
        unitphone: '', // 单位负责人联系电话
        unitname: '', // 单位联系人姓名
        worktelephone: ''// 单位联系人电话
      }
      // disableItem: {
      //   disableShow: true,
      //   itemInfoFormTitle: '',
      //   itemInfoForm: {}
      // }
    }
  },
  props: {
    unemploymentItem1: Object
    // disableItem: Object
  },
  watch: {
    // 回显
    unemploymentItem1 (a) {
      this.form = a
    }
  },
  methods: {
    save () {
      // if (!this.form.name) {
      //   this.$Notice.error({ title: '请填写姓名', desc: '' })
      //   return
      // }
      // if (!this.form.sex) {
      //   this.$Notice.error({ title: '请选择性别', desc: '' })
      //   return
      // }
      // if (!this.form.age) {
      //   this.$Notice.error({ title: '请填写年龄', desc: '' })
      //   return
      // }
      // if (!this.form.isSubsistenceAllowances) {
      //   this.$Notice.error({ title: '请选择是否是低保', desc: '' })
      //   return
      // }
      // if (!this.form.familyaddress) {
      //   this.$Notice.error({ title: '请填写家庭地址', desc: '' })
      //   return
      // }
      this.$emit('form', this.form)
    }
    /*    beforeUpload (file) {
        let that = this
        const reader = new FileReader()
        reader.readAsDataURL(file)
        reader.onload = () => {
          let index = reader.result.indexOf('base64,') + 7
          that.upPicData.list = reader.result.substring(index)
          that.upPic(that.upPicData)
        }
        return false
      },
      // 上传图片
      upPic (obj) {
        uploadPic(obj).then(res => {
          if (res.data.data.status === '1') {
            let imgurl = res.data.data.url
            let list = this.documentlist[this.formItem.paramIndex]
            if (list.img_urls) {
              list.img_urls.push(imgurl)
            } else {
              list.img_urls = [imgurl]
            }
            this.temp_photo = imgurl
          } else {
            this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
          }
        })
      } */
  }
  // mounted () {
  //   this.time = this.time.getFullYear() + (this.time.getMonth() + 1) + this.time.getData()
  // }
}
</script>

<style scoped>
  .layout{
    background: #f5f7f9;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
  }
  .demo-spin-icon-load{
    animation: ani-demo-spin 1s linear infinite;
  }
  .demo-spin-col{
    height: 100px;
    position: relative;
  }
  .mb20 {
    margin-bottom: 20px;
  }
  .layout-logo{
    width: 110px;
    height: 30px;
    background: #5b6270;
    border-radius: 3px;
    float: left;
    position: relative;
    top: 15px;
    left: 20px;
  }
  .layout-nav{
    width: 420px;
    margin: 0 auto;
    margin-right: 20px;
  }
  .layout-footer-center{
    text-align: center;
  }
  .content{
    height: auto;
    background-color:white;
    padding-left: 30px;
    padding-right: 30px;
  }
  .items{
    height:40px;
    line-height:40px
  }
  .info{
    height: auto;
    background-color:#F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
  }
  .header{
    height: 40px;
    background-color: white;
    line-height: 40px;
    border-bottom: 1px solid orangered;
  }
  .info-middle{
    height: 330px;
    background-color: #F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
    padding-bottom: 15px;
  }
  .titles{
    height: 35px;
    background-color: black;
    line-height: 35px;
    font-size: 1rem;
    color: white;
    padding-left: 10px;
  }
  .nopadding .ivu-table-cell {
    padding: 0px 0px;
  }
  .head_btn {
    height:45px;
    line-height:45px;
    width: 130px;
    float: left;
    margin-right: 20px;
  }
  .subsidy-img {
    height: 140px;
    width: 120px;
    position: absolute;
    right: 8%;
    top: 11%;
  }
  .centerimg {
    text-align: center;
  }
  .pre_img_style {
    height:500px;
    width:auto;
    max-width: 500px;
  }
</style>
